<?php

class Form_Property extends Form_Custom_General {

    public function init() {

        $prp_id = $this->createElement('hidden', 'prp_id')
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->setAttribs(Array("size" => "60"));
        $this->addElement($prp_id);

        $member_username = $this->createElement('text', 'member_username')
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->setAttribs(Array('class' => "form-control", "placeholder" => ""));
        $this->addElement($member_username);


        $member_email = $this->createElement('text', 'member_email')
                ->setRequired(TRUE)
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Email address should not be blank.')))
                ->addValidator(new Zend_Validate_EmailAddress())
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                    new Zend_Filter_StringToLower()
                ))
                ->setAttribs(Array('class' => "form-control", "placeholder" => ""));
        $member_email->getValidator('emailAddress')->setMessage("Email address is not valid.", Zend_Validate_EmailAddress::INVALID_FORMAT);
        $this->addElement($member_email);





        $mem_name = $this->createElement('text', 'mem_name')
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'First name should not be blank.')))
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->setAttribs(Array('class' => "form-control", "placeholder" => ""));
        $this->addElement($mem_name);

        $mem_surname = $this->createElement('text', 'mem_surname')
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Surname should not be blank.')))
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->setAttribs(Array('class' => "form-control", "placeholder" => ""));
        $this->addElement($mem_surname);

        $member_phone = $this->createElement('text', 'member_phone')
                ->setRequired(TRUE)
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Telephone should not be blank.')))
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->setAttribs(Array('class' => "form-control", "placeholder" => ""));
        $this->addElement($member_phone);
        
        
        
        
        $mem_mobile = $this->createElement('text', 'mem_mobile')
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Mobile should not be blank.')))
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->setAttribs(Array('class' => "form-control", "placeholder" => "Mobile"));
        $this->addElement($mem_mobile);
        
        
        $mem_landline = $this->createElement('text', 'mem_landline')
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Landline number should not be blank.')))
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->setAttribs(Array('class' => "form-control", "placeholder" => "Landline number"));
        $this->addElement($mem_landline);
        
        
        $mem_work = $this->createElement('text', 'mem_work')
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Work phone should not be blank.')))
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->setAttribs(Array('class' => "form-control", "placeholder" => "Work phone number"));
        $this->addElement($mem_work);
        
        
        $mem_representative_name = $this->createElement('text', 'mem_representative_name')
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Representative name should not be blank.')))
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->setAttribs(Array('class' => "form-control", "placeholder" => "Representative name"));
        $this->addElement($mem_representative_name);
        
        
        $mem_representative_telephone1 = $this->createElement('text', 'mem_representative_telephone1')
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Representative telephone1 should not be blank.')))
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->setAttribs(Array('class' => "form-control", "placeholder" => "Representative telephone1"));
        $this->addElement($mem_representative_telephone1);
        
        
        $mem_representative_telephone2 = $this->createElement('text', 'mem_representative_telephone2')
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Representative telephone2 should not be blank.')))
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->setAttribs(Array('class' => "form-control", "placeholder" => "Representative telephone2"));
        $this->addElement($mem_representative_telephone2);
        
        
        
        $mem_representative_telephone3 = $this->createElement('text', 'mem_representative_telephone3')
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Representative telephone3 should not be blank.')))
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->setAttribs(Array('class' => "form-control", "placeholder" => "Representative telephone3"));
        $this->addElement($mem_representative_telephone3);
        
        $mem_address = $this->createElement('text', 'mem_address')
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Address should not be blank.')))
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->setAttribs(Array('class' => "form-control", "placeholder" => "Address"));
        $this->addElement($mem_address);

        $mem_country = $this->createElement('select', 'mem_country')
                ->setRequired(TRUE)
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Please select country.')))
                ->setAttribs(Array('class' => "select2 member-country", 'style' => "width:100%"));
        $this->addElement($mem_country);

        $mem_city = $this->createElement('select', 'mem_city')
                ->setRequired(TRUE)
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Please select city.')))
                ->setAttribs(Array('class' => "select2 member-city", 'style' => "width:100%"));
        $this->addElement($mem_city);
        
        $prp_displayaddress = $this->createElement('text', 'prp_displayaddress')
                ->setRequired(TRUE)
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Property display Address should not be blank.')))
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->setAttribs(Array('class' => "form-control", "placeholder" => "Property display Address"));
        $this->addElement($prp_displayaddress);

        $prp_address = $this->createElement('text', 'prp_address')
                ->setRequired(TRUE)
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Search address should not be blank.')))
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->setAttribs(Array('class' => "form-control", "placeholder" => "Search address in map"));
        $this->addElement($prp_address);

        $prp_lat = $this->createElement('text', 'prp_lat')
                ->setRequired(TRUE)
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Latitude should not be blank.')))
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->setAttribs(Array('class' => "form-control", "placeholder" => "latitude", 'readonly' => 'true'));
        $this->addElement($prp_lat);

        $prp_lon = $this->createElement('text', 'prp_lon')
                ->setRequired(TRUE)
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Longitude should not be blank.')))
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->setAttribs(Array('class' => "form-control", "placeholder" => "longitude", 'readonly' => 'true'));
        $this->addElement($prp_lon);




        $property_type = $this->createElement('select', 'property_type')
                ->setRequired(TRUE)
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Please select property type.')))
                ->setAttribs(Array('class' => "select2 property-select", 'style' => "width:100%"));
        $this->addElement($property_type);
        
        
        
        $property_subtype = $this->createElement('select', 'property_subtype')
                ->setRequired(TRUE)
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Please select property subtype.')))
                ->setAttribs(Array('class' => "select2 property-subtype-select", 'style' => "width:100%"));
        $this->addElement($property_subtype);
        
        
        
        

        $prp_bedrooms = $this->createElement('select', 'prp_bedrooms')
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Please select property bedrooms.')))
                ->setAttribs(Array('class' => "select2", 'style' => "width:100%"));
        $this->addElement($prp_bedrooms);


        $prp_bathrooms = $this->createElement('select', 'prp_bathrooms')
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Please select property bathrooms.')))
                ->setAttribs(Array('class' => "select2", 'style' => "width:100%"));
        $this->addElement($prp_bathrooms);

        $prp_saleprice = $this->createElement('text', 'prp_saleprice')
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Price Sale should not be blank.')))
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->setAttribs(Array('class' => "form-control", "placeholder" => "Price Sale"));
        $this->addElement($prp_saleprice);




        $prp_rentprice = $this->createElement('text', 'prp_rentprice')
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Price Rent should not be blank.')))
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->setAttribs(Array('class' => "form-control", "placeholder" => "Price Rent"));
        $this->addElement($prp_rentprice);




        $prp_plotsize = $this->createElement('select', 'prp_plotsize')
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Please select property plotsize.')))
                ->setAttribs(Array('class' => "select2", 'style' => "width:100%"));
        $this->addElement($prp_plotsize);

        $prp_plotarea = $this->createElement('text', 'prp_plotarea')
                ->setRequired(TRUE)
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Plot Area should not be blank.')))
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->setAttribs(Array('class' => "form-control", "placeholder" => "Plot Area"));
        $this->addElement($prp_plotarea);



        $prp_built_year = $this->createElement('text', 'prp_built_year')
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Year of built should not be blank.')))
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->setAttribs(Array('class' => "form-control", "placeholder" => "Year of built"));
        $this->addElement($prp_built_year);



        $prp_coveredarea = $this->createElement('text', 'prp_coveredarea')
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Covered Area size should not be blank.')))
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->setAttribs(Array('class' => "form-control", "placeholder" => "Covered Area size"));
        $this->addElement($prp_coveredarea);


        $prp_coveredverenda = $this->createElement('text', 'prp_coveredverenda')
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Covered veranda size should not be blank.')))
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->setAttribs(Array('class' => "form-control", "placeholder" => "Covered veranda size"));
        $this->addElement($prp_coveredverenda);


        $prp_floor = $this->createElement('select', 'prp_floor')
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Please select property floor.')))
                ->setAttribs(Array('class' => "select2", 'style' => "width:100%"));
        $this->addElement($prp_floor);





        $prp_secondry = $this->createElement('multiselect', 'prp_secondry')
                //->setRequired(TRUE)
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Please select property city.')))
                ->setAttribs(Array('class' => "select2", 'style' => "width:100%"));
        $this->addElement($prp_secondry);

        
        
        $prp_indoor = $this->createElement('multiselect', 'prp_indoor')
                //->setRequired(TRUE)
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Please select property city.')))
                ->setAttribs(Array('class' => "select2", 'style' => "width:100%"));
        $this->addElement($prp_indoor);
        
        
        $prp_outdoor = $this->createElement('multiselect', 'prp_outdoor')
                //->setRequired(TRUE)
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Please select property city.')))
                ->setAttribs(Array('class' => "select2", 'style' => "width:100%"));
        $this->addElement($prp_outdoor);
        
        
        
        
        $prp_tenancy = $this->createElement('multiselect', 'prp_tenancy')
                //->setRequired(TRUE)
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Please select property city.')))
                ->setAttribs(Array('class' => "select2", 'style' => "width:100%"));
        $this->addElement($prp_tenancy);
        

        $prp_petsallowed = $this->createElement('text', 'prp_petsallowed')
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Pets allowed should not be blank.')))
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->setAttribs(Array('class' => "span12 tagsinput", "data-role" => "tagsinput"));
        $this->addElement($prp_petsallowed);



        $prp_garage = $this->createElement('text', 'prp_garage')
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Garage should not be blank.')))
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->setAttribs(Array('class' => "span12 tagsinput", "data-role" => "tagsinput"));
        $this->addElement($prp_garage);


        $prp_parkingspace = $this->createElement('text', 'prp_parkingspace')
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Parking space should not be blank.')))
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->setAttribs(Array('class' => "span12 tagsinput", "data-role" => "tagsinput"));
        $this->addElement($prp_parkingspace);



        $prp_warehouse = $this->createElement('text', 'prp_warehouse')
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Parking space should not be blank.')))
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->setAttribs(Array('class' => "span12 tagsinput", "data-role" => "tagsinput"));
        $this->addElement($prp_warehouse);



        $prp_country = $this->createElement('select', 'prp_country')
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Please select property country.')))
                ->setAttribs(Array('class' => "select2 property-country", 'style' => "width:100%"));
        $this->addElement($prp_country);


        $prp_city = $this->createElement('select', 'prp_city')
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Please select property city.')))
                ->setAttribs(Array('class' => "select2 property-city", 'style' => "width:100%"));
        $this->addElement($prp_city);



        $prp_area = $this->createElement('select', 'prp_area')
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Please select property area.')))
                ->setAttribs(Array('class' => "select2 property-area", 'style' => "width:100%"));
        $this->addElement($prp_area);



        $prp_enoria = $this->createElement('select', 'prp_enoria')
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Please select property enoria.')))
                ->setAttribs(Array('class' => "select2 property-enoria", 'style' => "width:100%"));
        $this->addElement($prp_enoria);


        $prp_entrynumber = $this->createElement('text', 'prp_entrynumber')
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Entry number should not be blank.')))
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->setAttribs(Array('class' => "form-control", "placeholder" => "Entry number"));
        $this->addElement($prp_entrynumber);



        $prp_plotnumber = $this->createElement('text', 'prp_plotnumber')
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Plot number should not be blank.')))
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->setAttribs(Array('class' => "form-control", "placeholder" => "Plot number"));
        $this->addElement($prp_plotnumber);



        $prp_zone = $this->createElement('text', 'prp_zone')
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Zone text should not be blank.')))
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->setAttribs(Array('class' => "form-control", "placeholder" => "Zone text"));
        $this->addElement($prp_zone);

        $prp_frontage = $this->createElement('text', 'prp_frontage')
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Frontage should not be blank.')))
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->setAttribs(Array('class' => "form-control", "placeholder" => "Frontage"));
        $this->addElement($prp_frontage);


        $prp_videotext = $this->createElement('text', 'prp_videotext')
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Video text should not be blank.')))
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->setAttribs(Array('class' => "form-control", "placeholder" => "Video text"));
        $this->addElement($prp_videotext);




        $prp_publish = $this->createElement('select', 'prp_publish')
                ->addFilters(array(
                    new Zend_Filter_StringTrim()
                ))
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Please select property status.')))
                ->setAttribs(Array('class' => "select2 property-enoria", 'style' => "width:100%"));
        $this->addElement($prp_publish);
    }

}